<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%--
  Created by IntelliJ IDEA.
  User: lsy
  Date: 2020/12/30
  Time: 10:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>体验项目查询</title>
</head>
<body>
<c:if test="${empty pageUtil}">
    <jsp:forward page="/dev/pageList"></jsp:forward>
</c:if>
<table border="1" align="center" width="1000px" height="400px">
    <tr align="center">
        <td colspan="8"><h2>体验项目查询</h2>

            <a href="${pageContext.request.contextPath}/peitems/add">添加</a>

        </td>
    </tr>
    <tr align="center">
        <th>项目编号</th>
        <th>项目名称</th>
        <th>所属类型</th>
        <th>是否必查</th>
        <th>参考值</th>
        <th>价格</th>
        <th>说明</th>
        <th>操作</th>
    </tr>
    <c:forEach var="p" items="${pageUtil.lists}">
        <tr align="center">
            <td>${p.itemid}</td>
            <td>${p.itemname}</td>
            <td>${p.typeid}</td>
            <td>${p.necessary}</td>
            <td>${p.ref}</td>
            <td>${p.price}</td>
            <td>${p.info}</td>
            <td>
                <a href="${pageContext.request.contextPath}/dev/del?itemid=${p.itemid}">删除</a>
                <a href="${pageContext.request.contextPath}/dev/updateById?itemid=${p.itemid}">修改</a>
            </td>
        </tr>
    </c:forEach>
    <tr align="center">
        <td colspan="8">
            当前页[${pageUtil.pageindex}/${pageUtil.pagecount}]
            <c:if test="${pageUtil.pageindex>1}">
                <a href="${pageContext.request.contextPath}/dev/pageList?pageIndex=1">首页</a>
                <a href="${pageContext.request.contextPath}/dev/pageList?pageIndex=${pageUtil.pageindex-1}">上一页</a>
            </c:if>
            <c:if test="${pageUtil.pageindex<pageUtil.pagecount}">
                <a href="${pageContext.request.contextPath}/dev/pageList?pageIndex=${pageUtil.pageindex+1}">下一页</a>
                <a href="${pageContext.request.contextPath}/dev/pageList?pageIndex=${pageUtil.pagecount}">尾页</a>
            </c:if>
        </td>
    </tr>
</table>
</body>
</html>
